﻿using FluentValidation;
using IT.CMS.Web.Areas.Administration.Models.Catalog;
using IT.CMS.Services.Localization;

namespace IT.CMS.Web.Areas.Administration.Validators.Catalog
{
    public class ManufacturerValidator : AbstractValidator<ManufacturerModel>
    {
        public ManufacturerValidator(ILocalizationService localizationService)
        {
            RuleFor(x => x.Name).NotNull().WithMessage(localizationService.GetResource("Admin.Catalog.Manufacturers.Fields.Name.Required"));
        }
    }
}